{template mobile_header}
<script>
    $(function(){
        $(".binding").click(function(){
            var phone = $("#phone").val();
            if(phone == ''){
                alert("请输入您的号码！");
            }else{
                var url = "{php echo $this->createMobileUrl('member',array('op' => 'to_binding'))}";
                $.ajax({
                    type : 'post',
                    url : url,
                    data : {'phone' : phone},
                    success : function(data){
                        if(data == 111){
                            alert("绑定成功！");
                            location.href="{php echo $this->createMobileUrl('member')}";
                        }else{
                            alert(data);
                        }
                    }
                });
            }
        });
    })
</script>
<div style="padding:20px;">
    <div class="alert alert-warning">
        请输入您的手机号码进行绑定
    </div>
    <div>
        <input type="text" placeholder="请输入您的手机号码" class="form-control" id="phone" />
    </div>
    <div>
        <button class="btn btn-primary binding">绑定</button>
    </div>
</div>


{template 'footer'}